﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HRM.Entity;

namespace HRM.DAL
{
    public class RelationshipStatusTypeDAL: BaseDAL
    {
        public List<RelationshipStatusType> GetAll()
        {
            return Repository.All<RelationshipStatusType>().ToList();
        }

        public RelationshipStatusType GetByID(int ID)
        {
            return Repository.Single<RelationshipStatusType>(item => item.ID == ID);
        }

        public RelationshipStatusType Add(RelationshipStatusType item)
        {
            Repository.Add<RelationshipStatusType>(item);
            return item;
        }

        public RelationshipStatusType Update(RelationshipStatusType item)
        {
            Repository.Update<RelationshipStatusType>(item);
            return item;
        }

        public void Delete(int ID)
        {
            Repository.Delete<RelationshipStatusType>(ID);
        }
    }
}
